﻿using FF14TreasureDiggingTool.DataAccess.Models;
using System;
using System.Globalization;
using System.Windows.Data;

namespace FF14TreasureDiggingTool.Helpers
{
    internal class SpecialEventToStringConverter : IValueConverter
    {
        public SpecialEventToStringConverter()
        { }

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var specialEvent = value as SpecialEvent;

            return "["
                + $"{specialEvent.Sort}"
                + "]"
                + specialEvent.EventName
                + $"[{specialEvent.Factor}]";
        }

        public object ConvertBack(
            object value,
            Type targetType,
            object parameter,
            CultureInfo culture
        )
        {
            return "";
        }
    }
}